#!/bin/sh

# File ID: 40788fae-5ef6-11df-a9dd-90e6ba3022ac

if test "$1" = "-d"; then
    grep '<l>' | perl -pe 's/^.*?<l>(.*?)<\/l>.*$/$1/g' | base64 -d | gpg 2>/dev/null
    exit
fi

guid=$1
[ -z "$guid" ] && guid="-r sunny@sunbase.org"
echo '<encr>'
gpg $guid -z9 -e 2>/dev/null | base64 - | commout l
echo '</encr>'
